-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STENCIL-2461 Check if gift certificates are enabled before rendering. #914
STENCIL-2461 Check if gift certificates are enabled before rendering. #914
Conversation
👍 |
{{> components/cart/gift-certificate-input}} | ||
</li> | ||
{{#if settings.gift_certificates_enabled}} | ||
{{#each cart.gift_certificates}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 spaces indention
</div> | ||
{{> components/cart/gift-certificate-input}} | ||
</li> | ||
{{#if settings.gift_certificates_enabled}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this flag because when gift certificates are disabled cart.gift_certificates
should be empty.
if cart.gift_certificates
is not empty is because a bcapp bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus, If you fix the issue in bcapp, you fix it for all themes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need the check to hide the form element which takes in the gift certificates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cart.gift_certificates
empty does not mean gift certificates are disabled. It just means no gift certificates are applied to cart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but if GC are disabled cart.gift_certificates
should be empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Checked out and tested locally 💚 |
Autotagging @mcampa @bc-miko-ademagic @davidchin |
Only show the gift certificate section if gift certificates are enabled.
@mcampa @mjschock @bigcommerce/stencil-team